Skip to content

Branch cut updates#3645

Merged
Simek merged 1 commit into
react:mainfrom
fortmarek:fortmarek/branch-cut-updates
May 25, 2023
Merged

Branch cut updates#3645
Simek merged 1 commit into
react:mainfrom
fortmarek:fortmarek/branch-cut-updates

Conversation

@fortmarek

@fortmarek fortmarek commented Mar 24, 2023

Copy link
Copy Markdown
Contributor
  • Updating the release docs after 0.72 branch cut off and RC0 release with the new steps to update and align packages on the new monorepo setup
  • Moving the wiki page that explains the new utility commands for updating packages to the website. The wiki page should link to the website documentation once this PR is merged.

@netlify

netlify Bot commented Mar 24, 2023

Copy link
Copy Markdown

Deploy Preview for react-native ready!

Name Link
🔨 Latest commit 9c1cfdc
🔍 Latest deploy log https://app.netlify.com/sites/react-native/deploys/646f0e41a8bda50008633eb4
😎 Deploy Preview https://deploy-preview-3645--react-native.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@fortmarek fortmarek force-pushed the fortmarek/branch-cut-updates branch from b9c4b29 to 6da53c0 Compare March 24, 2023 13:42
@fortmarek fortmarek force-pushed the fortmarek/branch-cut-updates branch 3 times, most recently from 601402f to 7bb8dd2 Compare April 3, 2023 09:45
@fortmarek fortmarek requested a review from hoxyq April 3, 2023 09:45
@fortmarek fortmarek marked this pull request as ready for review April 3, 2023 09:46
The packages in the `react-native` monorepo should be always one minor version ahead of the latest or RC version. Once you're done with releasing the initial RC0, you should:

- Create a new branch in `react-native` from `main` in your own fork.
- Run `npm run bump-all-updated-packages --release-branch-cutoff` to bump the minor versions of all packages.

@hoxyq hoxyq Apr 3, 2023

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- Run `npm run bump-all-updated-packages --release-branch-cutoff` to bump the minor versions of all packages.
- Run `npm run bump-all-updated-packages -- --release-branch-cutoff` to bump the minor versions of all packages.

For npm we need to add explicit --, because node accepts arguments in a form like --<arg>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not true for yarn, though. So we can change in to yarn bump-all-updated-packages --release-branch-cutoff or provide both variants.


#### How to execute

`npm run bump-all-updated-packages` or `npm run bump-all-updated-packages --release-branch-cutoff`

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
`npm run bump-all-updated-packages` or `npm run bump-all-updated-packages --release-branch-cutoff`
`npm run bump-all-updated-packages` or `npm run bump-all-updated-packages -- --release-branch-cutoff`

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I used yarn instead since that's the tool of choice for other commands such as running test-e2e-local

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I used yarn instead since that's the tool of choice for other commands such as running test-e2e-local

Can you please update examples of executing this command with yarn? I don't have a strong opinion on if we should include both, seems pretty straightforward, but definitely better for it to be either yarn or npm everywhere

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair point, done 👍


- Add and commit the extra file that got created at `sdks/hermes/.hermesversion`.

- Update packages in the monorepo by running `npm run bump-all-updated-packages`. All the package bumps should be a patch. Read more about the script and how they work [here](./release-updating-packages).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add one more sentence on why we need to do it?

Maybe something like "We need to publish the latest available changes in our code, so they will be included in a new RC"

@fortmarek fortmarek force-pushed the fortmarek/branch-cut-updates branch 3 times, most recently from d8f24c7 to fe8da5e Compare April 3, 2023 11:05

@kelset kelset left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good stuff, thanks for working on this @fortmarek! I've left a few suggestions improvements and one main change that I think will make the guide more streamlined.

Comment thread website/contributing/release-branch-cut-and-rc0.md Outdated
Comment thread website/contributing/release-branch-cut-and-rc0.md Outdated
- Update packages in the monorepo by running `yarn bump-all-updated-packages`. All the package bumps should be a patch. We need to publish the latest package changes, so they will be included in a new RC. Read more about the script and how they work [here](./release-updating-packages).
- Push the commit created by the previous command to the `0.x-stable` branch.

### 2. Push the branch and test the current changes

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just noticed that in this guide we only push the branch up at this step 2.

Maybe let's change this second step to be part of step 1, and separate the Hermes bump into its own step and the bump all packages into its own step too?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I created separate steps for Hermes and monorepo packages bumps.

I kept this step as a separate one that we should still run only after Hermes + packages bumps as I don't think it's necessary to push multiple times? Or do you see the workflow as:

  • Create new branch, push its current state
  • Hermes bump
  • monorepo bumps
  • push the changes again

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's ok

Comment thread website/contributing/release-branch-cut-and-rc0.md Outdated
Comment thread website/contributing/release-branch-cut-and-rc0.md Outdated
Comment thread website/contributing/release-updating-packages.md Outdated
Comment thread website/contributing/release-branch-cut-and-rc0.md Outdated
@fortmarek fortmarek force-pushed the fortmarek/branch-cut-updates branch 2 times, most recently from 19c5917 to bc4a88b Compare May 18, 2023 18:22
@fortmarek fortmarek requested a review from kelset May 18, 2023 18:22
@kelset

kelset commented May 24, 2023

Copy link
Copy Markdown
Contributor

LGTM thanks @fortmarek - can you just fix the lint error?

Then @Simek this can be merged 👍

@fortmarek fortmarek force-pushed the fortmarek/branch-cut-updates branch from bc4a88b to 9c1cfdc Compare May 25, 2023 07:29
Comment on lines +6 to +7
This page contains relevant information about how to update packages in the `react-native` [monorepo](https://github.com/react-native-community/discussions-and-proposals/pull/480).

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if linking RFC add anything useful for the page context.

@Simek Simek left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one nit about RFC link, other than that LGTM! 👍

Let's cross-check with someone form Meta before landing this tho.

Simek

This comment was marked as duplicate.

@Simek Simek requested review from cortinico and removed request for kelset May 25, 2023 08:20
@kelset

kelset commented May 25, 2023

Copy link
Copy Markdown
Contributor

@Simek for the Meta approval, @hoxyq is from Meta and he wrote the original doc that we're importing, so we can already go ahead without needing Nicola ;)

@Simek Simek merged commit 5897bef into react:main May 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants